<template>
  <el-drawer :size="language == 'zh'?'40%':'50%'" v-model="editQifaPropsVisible" append-to-body>
    <template #header>{{ editQifaPropsMsg['title'+editQifaPropsMsgType] }}</template>

    <el-scrollbar height="100%">
      <el-form :model="editQifaPropsFromData" label-position="top" :rules="rules" ref="goodsRuleFormRef">
        <el-row :gutter="40">
          <el-col :span="12" v-for="(item, key) in editQifaPropsFromData">
            <el-form-item :label="item.label" :prop="`${key}.value`">
              <!-- <component :is="item.type"></component>-->
              <template v-if="item.vBind=='v-number'">
                <el-input :placeholder="editQifaPropsMsg.noModifications"  v-if="item.type == 'el-input'" v-number:4 v-bind="item.attr" v-model="item.value"></el-input>
              </template>
              <template v-else>
                <el-input :placeholder="editQifaPropsMsg.noModifications"  v-if="item.type == 'el-input'" v-bind="item.attr" v-model="item.value"></el-input>
              </template>
             

              <el-select v-if="item.type == 'el-select'" :placeholder="editQifaPropsMsg.noModifications"  v-bind="item.attr" v-model="item.value">
                <el-option
                  v-for="itemOption in item.options"
                  :key="itemOption.value"
                  :label="itemOption.label"
                  :value="itemOption.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-scrollbar>
    <template #footer>
 
      <el-button type="default" @click="editQifaPropsResetFn">{{ editQifaPropsMsg.cancel }}</el-button>
      <el-button type="primary" @click="editQifaPropsSavetFn">{{ editQifaPropsMsg.save }}</el-button>
    </template>
  </el-drawer>
</template>
<script setup lang='ts' name='editQifaPropsC'> 
import { ref, reactive, getCurrentInstance, inject, h, defineComponent,computed } from "vue";
import { useGlobalStore } from "@/stores/modules/global";
const globalStore = useGlobalStore();
const language = computed(() => globalStore.language);//页面翻译语种
const editQifaPropsVisible = inject("editQifaPropsVisible");
const editQifaPropsMsg = inject("editQifaPropsMsg");
const editQifaPropsMsgType = inject("editQifaPropsMsgType");
const editQifaPropsFromData = inject("editQifaPropsFromData");
const editQifaPropsResetFn = inject("editQifaPropsResetFn");
const editQifaPropsSavetFn = inject("editQifaPropsSavetFn");
 
</script>
<style lang='scss' scoped>
</style>
